Page({
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index',
    })
  },
  data:{
    houseDetail:{}
  },
  onLoad({id}){
    this.getHouseDetail(id)
  },
    //获取地址中携带id的房屋
 async getHouseDetail(id){
  if(!id) return wx.utils.toast('参数有误')
  const {code,data:houseDetail}=await wx.http.get(`/room/`+id)
  if(code!==10000) return wx.utils.toast()
  this.setData({
    houseDetail
  })
},
})
